package com.yuan.dingtalk.service;


import com.taobao.api.ApiException;
import com.yuan.dingtalk.vo.UserInfo;

public class DingtalkService extends AbstractCacheDingtalk {

    public DingtalkService(String apiUrl, String cacheType) {
        super(apiUrl, cacheType);
    }

    @Override
    public UserInfo getUserInfo(String appKey, String appSecret, String code, String lang) throws ApiException {
        String accessToken = super.getCacheAccessToken(appKey, appSecret);
        String userId = super.getUserId(accessToken, code);
        return super.getUserInfo(accessToken, userId, lang);
    }
}
